home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
presto
/
presto10.lha
/
README
< prev
next >
Wrap
Text File
|
1991-12-13
|
8KB
|
192 lines
Presto 1.0
----------
This file tree contains PRESTO, PRESTO documentation, and
Symmetry C++ hints. The PRESTO code runs in the bsd universe of
Sequent Symmetry DYNIX 3.0, on Sun 3 SunOS 3.3, 3.5, and 4.0,
VAX Ultrix 2.3, and MIPS Ultrix 4.1/4.2
*********************
IMPORTANT NOTE FOR PRESTO 1.0
This version of Presto has been tested and used ONLY
on Sequent Symmetry Dynix 3.0 and MIPS/Ultrix 4.1/4.2.
NO WORK has been done on the Sun 68XXX ports, or the VAX
port. It probably wouldn't be every difficult to get this
running, and it would probably be easy to use the MIPS
version for a SPARC port. We have not done this, however.
*********************
PRESTO was developed at the University of Washington Department of
Computer Science. See the ./Manual directory for more information.
PRESTO was ported to MIPS/Ultrix by Brian Bershad, Raj Vaswani and
Paul Barton-Davis at the University of Washington.
PRESTO was ported to the Sun 3 at the Rice University
Department of Electrical and Computer Engineering. Jim Carson
(carson@rice.edu, ...uunet!rice!mu!carson) did most of the work.
He has offered to field questions specifically related to the Sun port.
Please do not send him any questions about PRESTO in general.
This Version
------------
This version of Presto is the first "official" port to a modern C++
language definition. Both AT&T C++2.1 and DEC's new native C++
compiler were used during the work.
It is based on a version used more or less only at the University of
Washington (often known as "Faust Presto", after John Faust who did
many of the modifications that distinguish it from Presto 0.4) Most of
the work in porting Presto was done Paul Barton-Davis at UW. Thanks to
I.Ashok for some ideas and Steve Clamage of TauMetric for help with
pointers to member functions.
This version contains several of the more successful modifications to PRESTO
made to date: local thread queues, local ready queues, fixed size stacks,
create/delete code path cleanup, and both styles of spinlock (original and
queue-based). It contains the fix to allow GPROF to collect uniprocessor
results properly, a fix for a floating point preemption problem (see
the #ifdef FPU_PREEMPT code) and it allows for processor affinity.
MIPS Port
---------
This version of Presto has also been ported to the MIPS RISC
architecture under Ultrix 4.1 & 4.2. Assembly language functions
provide an atomic test-and-set, and the only significant difference
between the MIPS and Symmetry versions is that threads may only be
passed a single argument when started (which can, of course, be a
pointer to an array). See threads.h for details. This port has been
used for an operating systems class taught on uniprocessor
DECstations, where it acted as the underlying thread mechanism for a
"small os".
Bug Alert
---------
DEC's native C++ compiler, cxx, cannot correctly compile the Presto
thread start code with debugging enabled. The error is in register
allocation, and seems to be a subtlety that DEC themselves suffer from
with their own CMA threads package. This means that you can't debug
Presto internals on a DECstation if you use cxx. AT&T cfront works
fine (but of course, you can't symbolically debug that either).
AT&T C++ on a Symmetry
----------------------
The directory seq_c++ contains patches to help you compile
AT&T C++ 2.1 on a Sequent Symmetry. This includes the "missing" patch
that was not included in the original Presto distribution, and whose
abscence prevents the correct declaration of shared or private
pointers to int or char.
User's Guide additions:
-----------------------
o The high contention spinlocks and atomic integers have the exact same
interface as the original spinlock and atomic integer classes. The
names of the new classes are HC_Spinlock and HC_AtomicInt.
o To turn on processor affinity, set affinity=1 in your Main::init()
function.
o The fixed size stack modification improves performance at the loss of
generality. All thread stacks are now the same size, the default is 16K.
To override this default value, you must set stacksize to the appropriate
value in Main::init().
Design Changes from UW-Faust Presto
-----------------------------------
Affinity
--------
Setting affinity before a fork is a bad idea, since affinity is
inherited across a fork(). This reduces some potential concurrency,
because both child and parent both claim to be bound to the same
processor, effectively blocking the parent until the child frees
up the processor. Several "structural" changes have been made to
reverse the order of the fork and affinity settings. This is at
once both a deep change (because of the need to change the Presto
startup process, and a shallow one, because not extra functionality
is gained (except for a little performance).
Starting Threads
-----------------
Presto has a very confused of what a pointer to a member function
is, which it inherited from similar confusion in AT&T C++ 1.2.
In the current C++ language definition, it is a fundamental
error to confuse such a pointer with a pointer to a function,
Because of this:
1) User-written presto programs should NOT use ptrs to member
functions as the second argument to a Thread::start()
call. Only global functions (including extern "C"
functions) will be supported by Presto in the future.
2) The startup code has some additional global functions
defined that allow Presto internals to follow this
practice. It looks kludgey, and it is, but its rooted
in Presto's fallacy that a C++ ptr to member function can
be treated like a ptr to function.
See presto.c and process.c for the functions:
start_Scheduler()
start_Main()
start_Process()
General Stuff
-------------
If your site retrieves a copy of PRESTO, please let us know with
email to presto@cs.washington.edu or uw-june!presto. You may
also address any criticism of PRESTO to these addresses. We
may reply; then again, we may not.
You will see references to the Sequent Balance and non-Ultrix
BSD-like VAX systems. However, we make no claims regarding
the suitability of this code to those systems.
The common source code for all versions of PRESTO is in ./src.
The subdirectories of src contain versions of the source files
which are specific to the PRESTO versions for particular
machines or operating systems.
The directories sequent, sun, and vax contain symbolic links to
the appropriate versions of the source files in the src directory.
The directories contain makefiles which make versions of the PRESTO
library appropriate for each system.
sequent -- Sequent Symmetry
mips -- MIPSEL Decstations running Ultrix 4.X
The sequent & mips directories each have a subdirectory called "test"
which contains some simple PRESTO applications and tests. The
different versions of the tests are built from common source files in
./test. The system-specific test directories contain symbolic links
into the top-level test directory.
For example, to make a version of the PRESTO library and all the tests
for the sequent, the correct sequence of commands would be:
makelinks sequent
cd sequent ; make
cd test ; make
Alternatively, you can say "make sequent" in this top level directory.
This will make all the links, libraries and test programs, and then
run the tests.
To get rid of the links, use "make cleanlinks" (this doesn't do
anything very clever).
All directory makefiles also have a "make clean" directive which
removes everything but the source file links.